package com.xcyy.clbzbh.service.imp;

import com.xcyy.clbzbh.entity.UserRole;
import com.xcyy.clbzbh.repository.UserRoleRepository;
import com.xcyy.clbzbh.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserRoleServiceImp implements UserRoleService {
    @Autowired
    private UserRoleRepository userRoleRepository;

    @Override
    public UserRole add(UserRole userRole) {
        return userRoleRepository.save(userRole);
    }

    @Override
    public UserRole findByUserId(String userId) {
        return userRoleRepository.findByUserId(userId);
    }
}
